{NeoBook Function}
'###############################
' Author: Andrei Solodyankin (as3856) 
' mail : as3856@rambler.ru
' www/neobooker.ru
'###############################

Language=VBScript
Comment=Creating an archive.
Param=[%1]|Text|File or folder to create an archive
Param=[%2]|Text|The path and name of the archive to be created
{End}
On Error Resume Next
InputFolder = "[%1]"
ZipFile = "[%2]"
CreateObject("Scripting.FileSystemObject").CreateTextFile(ZipFile, True).Write "PK" & Chr(5) & Chr(6) & String(18, vbNullChar)
Set objShell = CreateObject("Shell.Application")
Set source = objShell.NameSpace(InputFolder).Items
objShell.NameSpace(ZipFile).CopyHere(source)
Do While objShell.NameSpace(ZipFile).Items.Count = objShell.NameSpace(InputFolder).Items.Count
Loop
